// echo aux function only, should not compile alone.
// -r:"../../Backend/System.IO.FileSystem.dll"

//! 编译方法，目前来说只能是自己改上面那行字，把缺的东西都补齐，之后送命令提示符或者用python脚本编译。
//! windows就是一坨shit……连通配符都不支持……不然我至少能写出类似 dotnet C:\Program Files\dotnet\sdk\*\Roslyn\bincore\csc.dll 这样的语法

// -r:"../../The Scroll of Taiwu_Data/Managed/Mono.Cecil.dll" -r:"../../The Scroll of Taiwu_Data/Managed/System.Core.dll"   -r:"../../The Scroll of Taiwu_Data/Managed/System.Composition.AttributedModel.dll" -r:"../../Backend/System.Runtime.dll"
/**
 *  Everyone's Unity Game Plugin
 *  Copyright (C) 2022 Neutron3529
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU Affero General Public License as
 *  published by the Free Software Foundation, either version 3 of the
 *  License, or (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU Affero General Public License for more details.
 *
 *  You should have received a copy of the GNU Affero General Public License
 *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */
//! 这是一个自带文档注释的Mod，虽然代码很shit，但里面有不少注释，或许会对之后准备玩过月逻辑的人有帮助。
//! 所有文档注释会用//!开头，请注意搜索
//! 首先是前后端，前端对后端的调用会先被塞进 ProcessMethodCall，之后分发给对应domain的CallMethod，由CallMethod进行进一步的分发。借助这一点，我们可以快速找到前端调用究竟是在使用哪个函数。
using System;
using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
using System.Collections.Generic;
using static Utils.Logger;

using Config.EventConfig;
using GameData.Domains.TaiwuEvent;
using GameData.Domains.TaiwuEvent.Enum;

namespace Neutron3529.ChaosEvents {
    public partial class ChaosEvents : EventPackage {
        public 才俊.才俊 E06(){
            var o=new 才俊.才俊();
            {
                var taiwuEvent = GameData.Domains.DomainManager.TaiwuEvent.GetEvent("fb38f657-6ed0-41e4-a0c2-c82afb49762f"); // @人物互动-恩义互动
                var lst=taiwuEvent.EventConfig.EventOptions.ToList();
                for(int i=0;i<o.EventOptions.Length;i++){
                    lst.Insert(lst.Count-1, o.EventOptions[i]);
                }
                taiwuEvent.EventConfig.EventOptions=lst.ToArray();
            }
            return o;
        }
    }
    namespace 才俊 {
        public class 才俊 : EventContainer {
            public 才俊() :base("Prof.才俊", "70b4d45d-ba15-423d-b94e-b40e348eb9c6"){
                this.EventOptions = new TaiwuEventOption[2];//凤求凰 填鸭
                for(int i=0;i<this.EventOptions.Length;i++){
                    var op=new TaiwuEventOption {
                        OptionKey = "Option_352906"+(i+1).ToString("02"),
                        OnOptionSelect = new Func<string>(this.OnOptionSelect(i)),
                        OnOptionVisibleCheck = new Func<bool>(this.OnCheckOptionCondition(i)),
                        OnOptionAvailableCheck = new Func<bool>(this.OnCheckEventCondition),
                        GetReplacedContent = new Func<string>(this.Desc(i)),
                        GetExtraFormatLanguageKeys = new Func<List<string>>(this.GetExtraFormatLanguageKeys)
                    };
                    this.EventOptions[i]=op;
                }
                AddEvent(new AutoEvent("Neutron.TextTemplate-才俊对话0","“小妹真技艺非法，寡人最近有些身心疲惫，可否进屋一聚？”",new string[]{"（欣然允诺……）","我尚有身孕，不便行房，告辞……（落荒而逃……）"}, new string[]{"Neutron.TextTemplate-才俊对话1",string.Empty},1));
                AddEvent(new AutoEvent("Neutron.TextTemplate-才俊对话1","在<Character key=CharacterId str=Name/>一次次鞭挞之下，<Character key=RoleTaiwu str=Name/>如往常一般运起媚功，任凭一阵又一阵快感扫过心口",new string[]{"（纵情娇喘……）"}, new string[]{"Neutron.TextTemplate-才俊对话2"},0));
                AddEvent(new AutoEvent("Neutron.TextTemplate-才俊对话2","<Character key=RoleTaiwu str=Name/>忽然感到小腹一阵绞痛，却是因为<Character key=RoleTaiwu str=Name/>功行带脉约束元阴时，触动了胎气\n失控的胎气裹挟着贮存的元阴在周身流转，令<Character key=RoleTaiwu str=Name/>痛苦不堪<color=#lightgrey>\n（因为阴阳失调，<Character key=RoleTaiwu str=Name/>的健康减少了）",new string[]{"呃……嗯……（咬紧牙关……）"}, new string[]{"Neutron.TextTemplate-才俊对话3"},0));
                AddEvent(new AutoEvent("Neutron.TextTemplate-才俊对话3","<Character key=CharacterId str=Name/>见<Character key=RoleTaiwu str=Name/>面色潮红，媚眼如丝，只当是<Character key=RoleTaiwu str=Name/>一时性起，不由得加大了鞭挞的力度<color=#lightgrey>\n（<Character key=CharacterId str=Name/>得到了<Character key=RoleTaiwu str=Name/>元阴的滋润，整个人因此春光满面）",new string[]{"不要……停下……（意识模糊……）"}, new string[]{"Neutron.TextTemplate-才俊对话4"},0));
                AddEvent(new AutoEvent("Neutron.TextTemplate-才俊对话4","待到<Character key=RoleTaiwu str=Name/>悠悠醒转，只觉身体空虚，整个身子因为行功出岔的疼痛而不自觉地扭曲成了奇怪的样子。\n浑身皮相也因为阴阳气几度盈缩而暂时地布满了皱纹\n\n而<Character key=CharacterId str=Name/>，大抵是意识到了自己险些被<Character key=RoleTaiwu str=Name/>所习魔音《凤求凰》控制，睡意全无，早就不见了踪影",new string[]{"（如此也好……）"}, new string[]{"Neutron.TextTemplate-才俊对话5"},0));
                AddEvent(new AutoEvent("Neutron.TextTemplate-才俊对话5","<Character key=RoleTaiwu str=Name/>勉强起身，忽然觉得私处一阵刺痛，伴随着一阵酥麻感自私处传遍全身，激得<Character key=RoleTaiwu str=Name/>一声娇呼\n<color=#lightgrey>\n（因为毒虫刺激，<Character key=RoleTaiwu str=Name/>体内的幻毒增加了）</color>",new string[]{"呀……（浑身无力，瘫倒在地，用力喘息……）"}, new string[]{"Neutron.TextTemplate-才俊对话6"},0));
                AddEvent(new AutoEvent("Neutron.TextTemplate-才俊对话6","待得<Character key=RoleTaiwu str=Name/>喘息完毕，只看见，想来这些小虫是春宵时的靡靡之气引来的\n每有一只小虫自大腿内侧爬过，便有一阵酥麻感传遍全身，让<Character key=RoleTaiwu str=Name/>约束不住元阴，因而提不起力气。纵然勉强站起，稍一走动，也会元阴四散，瘫倒在地",new string[]{"（无可奈何……）"}, new string[]{"Neutron.TextTemplate-才俊对话7"},0));
                AddEvent(new AutoEvent("Neutron.TextTemplate-才俊对话7","在被毒虫折磨许久，在意识逐渐朦胧之时，<Character key=RoleTaiwu str=Name/>忽然忆起南疆一蛊方，以腹为皿，以土为材，以虫为薪，可借女娲造人之意，借土石修补自身\n但秘法要求以凡土碎石凝石芯，正法既成则不可再行人道",new string[]{"（性命要紧，管不得许多……）"}, new string[]{"Neutron.TextTemplate-才俊对话8"},0));
                AddEvent(new AutoEvent("Neutron.TextTemplate-才俊对话8","<Character key=RoleTaiwu str=Name/>强忍毒虫带来的不适，扑在地上，一把草一把泥土，一边抓一边塞入私处<color=#lightgrey>\n（因为准备仓促，秘法几度出岔，导致<Character key=RoleTaiwu str=Name/>的内息上涨了）</color>",new string[]{"呃……呕……（好不狼狈……）"}, new string[]{"Neutron.TextTemplate-才俊对话9"},0));
                AddEvent(new AutoEvent("Neutron.TextTemplate-才俊对话9","在九九八十一次填土之后，<Character key=RoleTaiwu str=Name/>体内的元阴终于没有了外泄的渠道<color=#lightgrey>\n（<Character key=RoleTaiwu str=Name/>借助秘法，以石芯锁住元阴不泄）</color>",new string[]{"（有喜有忧……）"}, new string[]{"Neutron.TextTemplate-才俊对话10"},0));
                AddEvent(new AutoEvent("Neutron.TextTemplate-才俊对话10","静下心来，<Character key=RoleTaiwu str=Name/>忽然想起，媚功之中，有一篇借助赤龙冲破石芯的秘法。身上的石芯，旬月可破\n另有一篇玉女经，专门教导石芯女子在习练媚功时应该如何泄去欲火，以及如何收拢纯化泄去的元阴",new string[]{"（是时候好好看看了……）"}, new string[]{"Neutron.TextTemplate-才俊对话11"},0));
                AddEvent(new AutoEvent("Neutron.TextTemplate-才俊对话11","走上街头，行人无不为<Character key=RoleTaiwu str=Name/>那吸收了九九八十一把泥土的肚子而惊叹\n“这么大的肚子……怕不是怀孩子怀了三年呢”",new string[]{"我这怀胎三年，怕不是只能生蛐蛐了呢……（哭笑不得……）"}, new string[]{string.Empty},0));
                // AddEvent(new AutoEvent("Neutron.TextTemplate-才俊对话12","",new string[]{""}, new string[]{"Neutron.TextTemplate-才俊对话13"},0));
            }
            private Func<bool> OnCheckOptionCondition(int index){
                switch(index){
                    case 1: return ()=>{
                        var pd=GameData.Domains.TaiwuEvent.EventHelper.EventHelper.GetCurrentProfessionData();
                        var character=this.EventOptions[index].ArgBox.GetCharacter("CharacterId");
                        var taiwuChar=this.EventOptions[index].ArgBox.GetCharacter("RoleTaiwu");
                        if(character!=null && taiwuChar!=null && pd!=null && pd.TemplateId == 4){
                            var lst=character.GetLearnedLifeSkills();
                            foreach(var x in taiwuChar.GetLearnedLifeSkills()){
                                var z=character.FindLearnedLifeSkillIndex(x.SkillTemplateId);
                                if(z==-1 || ((x.ReadingState&~lst[z].ReadingState)>0)){
                                    return true;
                                }
                            }
                        }
                        return false;
                    };
                    default: return ()=>{
                        var pd=GameData.Domains.TaiwuEvent.EventHelper.EventHelper.GetCurrentProfessionData();
                        var character=this.EventOptions[index].ArgBox.GetCharacter("CharacterId");
                        var taiwuChar=this.EventOptions[index].ArgBox.GetCharacter("RoleTaiwu");
                        return character!=null && taiwuChar!=null && pd!=null && character.GetGender()!=taiwuChar.GetGender() && pd.TemplateId == 4 && pd.IsSkillUnlocked(1);
                    };
                }
            }
            public class RegAdvMonth{
                int id;
                public RegAdvMonth(GameData.Common.DataContext context, int id){
                    this.id=id;
                    if(GameData.Domains.DomainManager.Character.TryGetElement_Objects(id, out var character)){
                        character.AddFeature(context, DefKey_InfertileFemale, true);
                    }
                }
                public void oamb(GameData.Common.DataContext context){
                    if(GameData.Domains.DomainManager.Character.TryGetElement_Objects(id, out var character)){
                        character.RemoveFeature(context, DefKey_InfertileFemale);
                        character.AddFeature(context, DefKey_VirginityTrue, true);
                    }
                    GameData.DomainEvents.Events.UnRegisterHandler_PostAdvanceMonthBegin(this.oamb);
                }
            }
            public class RegAdvMonth_Avatar{
                int id;
                public RegAdvMonth_Avatar(GameData.Common.DataContext context, int id){
                    this.id=id;
                    if(GameData.Domains.DomainManager.Character.TryGetElement_Objects(id, out var character)){
                        var avatar=character.GetAvatar();
                        avatar.SetGrowableElementShowingAbility(3,true);
                        avatar.SetGrowableElementShowingAbility(4,true);
                        avatar.SetGrowableElementShowingAbility(5,true);
                        character.SetAvatar(avatar, context);
                    }
                }
                public void oamb(GameData.Common.DataContext context){
                    if(GameData.Domains.DomainManager.Character.TryGetElement_Objects(id, out var character)){
                        var avatar=character.GetAvatar();
                        var age=character.GetPhysiologicalAge();
                        avatar.SetGrowableElementShowingAbility(3,GameData.Domains.Character.Character.IsAbleToGrowWrinkle1(age));
                        avatar.SetGrowableElementShowingAbility(4,GameData.Domains.Character.Character.IsAbleToGrowWrinkle2(age));
                        avatar.SetGrowableElementShowingAbility(5,GameData.Domains.Character.Character.IsAbleToGrowWrinkle3(age));
                        character.SetAvatar(avatar, context);
                    }
                    GameData.DomainEvents.Events.UnRegisterHandler_PostAdvanceMonthBegin(this.oamb);
                }
            }
            public static short DefKey_VirginityTrue = (short?)typeof(Config.CharacterFeature.DefKey).GetField("VirginityTrue",(BindingFlags)(-1))?.GetValue(null)??Config.CharacterFeature.DefKey.VirginityTrue;
            public static short DefKey_InfertileFemale = (short?)typeof(Config.CharacterFeature.DefKey).GetField("InfertileFemale",(BindingFlags)(-1))?.GetValue(null)??Config.CharacterFeature.DefKey.InfertileFemale;
            public static short DefKey_InfertileMale = (short?)typeof(Config.CharacterFeature.DefKey).GetField("InfertileMale",(BindingFlags)(-1))?.GetValue(null)??Config.CharacterFeature.DefKey.InfertileMale;
            public static short DefKey_Pregnant = (short?)typeof(Config.CharacterFeature.DefKey).GetField("Pregnant",(BindingFlags)(-1))?.GetValue(null)??Config.CharacterFeature.DefKey.Pregnant;
            public static ushort RelationType_Adored= (ushort?)typeof(GameData.Domains.Character.Relation.RelationType).GetField("Adored",(BindingFlags)(-1))?.GetValue(null) ?? GameData.Domains.Character.Relation.RelationType.Adored;
            public static MethodInfo SetBabyBonusMainAttributes=typeof(GameData.Domains.Taiwu.TaiwuDomain).GetMethod("SetBabyBonusMainAttributes",(BindingFlags)(-1));
            public static MethodInfo SetBabyBonusCombatSkillQualifications=typeof(GameData.Domains.Taiwu.TaiwuDomain).GetMethod("SetBabyBonusCombatSkillQualifications",(BindingFlags)(-1));
            public static MethodInfo SetBabyBonusLifeSkillQualifications=typeof(GameData.Domains.Taiwu.TaiwuDomain).GetMethod("SetBabyBonusLifeSkillQualifications",(BindingFlags)(-1));
            private unsafe Func<string> OnOptionSelect(int index){
                switch(index){
                    case 0:return ()=>{
                        var character=this.EventOptions[index].ArgBox.GetCharacter("CharacterId");
                        var taiwuChar=this.EventOptions[index].ArgBox.GetCharacter("RoleTaiwu");
                        var cname=Name(character);
                        var tname=Name(taiwuChar);
                        var currDate=GameData.Domains.DomainManager.World.GetCurrDate();
                        var lifeRecordCollection = GameData.Domains.DomainManager.LifeRecord.GetLifeRecordCollection();
                        var location=character.GetLocation();
                        if(taiwuChar.GetLifeSkillQualification(0)<100){
                            return Goto("“阁下音律如山猿咆哮，饶人清净！”","（垂头丧气……）",index);
                        } else if(taiwuChar.GetLifeSkillQualification(0)>=200){
                            GameData.Domains.DomainManager.Character.AddRelation(this.context, character.GetId(), taiwuChar.GetId(), RelationType_Adored, GameData.Domains.DomainManager.World.GetCurrDate());
                            if(taiwuChar.GetGender()!=character.GetGender()) {
                                // 不可通过直接修改生育力缓存来绕过生育限制，因为SetFeatures会自动重置生育力缓存
                                // 通过特性修改生育会将特性存盘，这并不好
                                // 因此这里选择在之后手工处理分配怀孕状态

                                if(character.GetGender()==0){
                                    // character是妹子
                                    character.MakeLove(this.context,taiwuChar,false);
                                    lifeRecordCollection.AddMakeLoveIllegal(character.GetId(), currDate, taiwuChar.GetId(), location);
                                    return Goto("“小哥真技艺非法，鄙人最近有些身心疲惫，可否进屋一聚？”","（欣然允诺……）",index,$"{tname}度过了愉快的一段时光\t（心满意得……）");
                                    // 应该是技艺非凡，但感觉“技艺非法”更合适一些……
                                } else {
                                    // character是汉子
                                    if(GameData.Domains.DomainManager.Character.TryGetPregnantState(taiwuChar.GetId(), out var ps)) {
                                        ps.ExpectedBirthDate=GameData.Domains.DomainManager.World.GetCurrDate()+1;
                                        SetBabyBonusMainAttributes.Invoke(GameData.Domains.DomainManager.Taiwu,new object[]{(short)0, this.context});
                                        SetBabyBonusCombatSkillQualifications.Invoke(GameData.Domains.DomainManager.Taiwu,new object[]{(short)0, this.context});
                                        SetBabyBonusLifeSkillQualifications.Invoke(GameData.Domains.DomainManager.Taiwu,new object[]{(short)0, this.context});
                                        ps.IsHuman=false;
                                        taiwuChar.ChangeDisorderOfQi(this.context,8000);
                                        taiwuChar.GetPoisoned().Items[4]=Math.Clamp(taiwuChar.GetPoisoned().Items[4] + 6561, 0, 25000);
                                        taiwuChar.GetPoisoned().Items[5]=Math.Clamp(taiwuChar.GetPoisoned().Items[5] + 6561, 0, 25000);

                                        character.SetHealth(character.GetLeftMaxHealth(false), this.context);
                                        taiwuChar.SetHealth(0, this.context);
                                        GameData.DomainEvents.Events.RegisterHandler_PostAdvanceMonthBegin(new RegAdvMonth(context, taiwuChar.GetId()).oamb);
                                        GameData.DomainEvents.Events.RegisterHandler_PostAdvanceMonthBegin(new RegAdvMonth_Avatar(context, taiwuChar.GetId()).oamb);
                                        return Event(this.EventOptions[index].ArgBox,"Neutron.TextTemplate-才俊对话0");
                                        // tsv系统仍然存在BUG
                                        // return Goto("“小妹真技艺非法，寡人最近有些身心疲惫，可否进屋一聚？”","（欣然允诺……）",index,$"在{cname}一次次鞭挞之下，{tname}如往常一般运起媚功，任凭一阵又一阵快感扫过心口\t（纵情娇喘……）\t{tname}忽然感到小腹一阵绞痛，却是因为{tname}功行带脉约束元阴时，触动了胎气\n失控的胎气裹挟着贮存的元阴在周身流转，令{tname}痛苦不堪\n<color=#lightgrey>（因为阴阳失调，{tname}的健康减少了）\t呃……嗯……（咬紧牙关……）\t{cname}见{tname}面色潮红，媚眼如丝，只当是{tname}一时性起，不由得加大了鞭挞的力度\n<color=#lightgrey>（{cname}得到了{tname}元阴的滋润，整个人因此春光满面）</color>\t不要……停下……（意识模糊……）\t待到{tname}悠悠醒转，只觉身体空虚，整个身子因为行功出岔的疼痛而不自觉地扭曲成了奇怪的样子。\n{cname}大抵是意识到了自己险些被{tname}所习魔音《凤求凰》控制，睡意全无，早就不见了踪影\t（如此也好……）\t{tname}勉强起身，忽然觉得私处一阵刺痛，伴随着一阵酥麻感自私处传遍全身，激得{tname}一声娇呼\n<color=#lightgrey>（因为毒虫刺激，{tname}体内的幻毒增加了）</color>\t呀……（浑身无力，瘫倒在地，用力喘息……）\t待得{tname}喘息完毕，只看见，想来这些小虫是春宵时的靡靡之气引来的\n每有一只小虫自大腿内侧爬过，便有一阵酥麻感传遍全身，让{tname}约束不住元阴，因而提不起力气。纵然勉强站起，稍一走动，也会立刻瘫倒在地\t（无可奈何……）\t在被毒虫折磨许久，在意识逐渐朦胧之时，{tname}忽然忆起南疆一蛊方，以腹为皿，以土为材，以虫为薪，可借女娲造人之意，借土石修补自身\t（只好如此……）\t{tname}强忍毒虫带来的不适，扑在地上，一把草一把泥土，一边抓一边塞入私处\n<color=#lightgrey>（因为准备仓促，秘法几度出岔，导致{tname}的内息上涨了）</color>\t呃……呕……（好不狼狈……）\t在九九八十一次填土之后，{tname}体内的元阴终于没有了外泄的渠道\n<color=#lightgrey>（{tname}借助秘法，以石芯锁住元阴不泄）</color>\t（有喜有忧……）\t静下心来，{tname}忽然想起，媚功之中，有一篇借助赤龙冲破石芯的秘法。身上的石芯，旬月可破\n另有一篇玉女经，专门教导石芯女子在习练媚功时应该如何泄去欲火，以及如何收拢纯化泄去的元阴\t（是时候好好看看了……）\t走上街头，行人无不为{tname}那吸收了九九八十一把泥土的肚子而惊叹\n“这么大的肚子……怕不是怀孩子怀了三年呢”\t我这怀胎三年，怕不是只能生蛐蛐了呢……（哭笑不得……）");
                                    } else {
                                        GameData.Domains.DomainManager.Character.CreatePregnantState(this.context, taiwuChar, character, false);
                                        taiwuChar.AddFeature(this.context, DefKey_Pregnant);
                                        character.MakeLove(this.context,taiwuChar,false);
                                        lifeRecordCollection.AddMakeLoveIllegal(character.GetId(), currDate, taiwuChar.GetId(), location);

                                        if(GameData.Domains.DomainManager.Character.TryGetPregnantState(taiwuChar.GetId(), out ps)) {
                                            ps.ExpectedBirthDate=GameData.Domains.DomainManager.World.GetCurrDate()+1;
                                            GameData.Domains.DomainManager.Taiwu.PrenatalEducateForCombatSkill(this.context, 30);
                                            GameData.Domains.DomainManager.Taiwu.PrenatalEducateForLifeSkill(this.context, 30);
                                            GameData.Domains.DomainManager.Taiwu.PrenatalEducateForMainAttribute(this.context, 30);
                                            character.SetBaseMaxHealth((short)Math.Max(character.GetBaseMaxHealth()-120,1),this.context);
                                            character.AddFeature(this.context, DefKey_InfertileMale, true);
                                            return Goto("“小妹真技艺非法，寡人最近有些身心疲惫，可否进屋一聚？”","（欣然允诺……）",index,$"在{cname}一次次鞭挞之下，{tname}有些体力不支，精神恍惚，元阴四散\t呃……啊……（咬紧牙关……）\t忽然{tname}感到一股热流冲入小腹，却是{tname}的元阴终于触动了{cname}的元阳\t（心头大喜，运功收纳……）\t{tname}的小腹，随着阴阳流转，时而因元阴泄去而萎缩如老妪，时而因元阳注入鼓胀如蛤蟆。如此反复数次，终究是鼓了起来\n阴阳之气在{tname}腹中不断交汇演化，一个强壮的胎儿因此快速成熟\t嗯……啊……（昏死过去……）\t待到{tname}悠悠醒转，直觉小腹沉重，细看去，竟已像怀了八九个月的产妇\n\n再看{cname}，一副采伐过度的样子，却是因为这一度春宵，吸尽了元阳，不仅折了寿数，竟连子孙根都被化去\t（哭笑不得……）");
                                        } else {
                                            return Goto("<color=#FF0000>你可以认为是红字了……\n中子并没有处理这种明明创建了PregnantState但无法获取PregnantState的情况\n\n你大概需要备份一次存档，并在此之后原地过月检查是否有过月红字\n或许这也是徒劳，毕竟理论上你永远也不应该看见这行字\n……请自求多福好了……</color>","（只好如此……）",index);
                                        }
                                    }
                                }
                            }
                        }
                        return Goto("“余音绕梁，感谢阁下，下次再约。”","（意犹未满……）",index);
                    };
                    // case 1:return ()=>{
                    //     this.EventOptions[index].ArgBox.Remove<bool>("NeutronFlag");
                    //     return "fb38f657-6ed0-41e4-a0c2-c82afb49762f"; // @人物互动-恩义互动
                    // };
                    case 1: return ()=>{
                        var pd=GameData.Domains.TaiwuEvent.EventHelper.EventHelper.GetCurrentProfessionData();
                        var character=this.EventOptions[index].ArgBox.GetCharacter("CharacterId");
                        var taiwuChar=this.EventOptions[index].ArgBox.GetCharacter("RoleTaiwu");
                        var cname=Name(character);
                        var tname=Name(taiwuChar);
                        var lst=character.GetLearnedLifeSkills();
                        foreach(var x in taiwuChar.GetLearnedLifeSkills()){
                            var z=character.FindLearnedLifeSkillIndex(x.SkillTemplateId);
                            if(z==-1){
                                lst.Add(x);
                            } else {
                                var w=lst[z];
                                w.ReadingState|=x.ReadingState;
                                lst[z]=w;
                            }
                        }
                        character.SetLearnedLifeSkills(lst, this.context);
                        return Goto($"宫商角徵羽，起于天元\n关关雎鸠，婉若游龙\n\n<color=#lightgrey>（{cname}在{tname}的填鸭式教育之下，学到了不少东西）</color>","（意犹未满……）",index);
                    };
                    default: return ()=>string.Empty;
                }
            }
            public override Func<string> Desc(int index){
                switch(index){
                    case 0:
                        return ()=>"（一曲《凤求凰》……）"
                            // return this.EventOptions[index].ArgBox.Contains<bool>("NeutronFlag")?"（力保举荐……）":"（凤求凰……）";
                        ;
                    case 1: return ()=>"（填鸭式教学……）";
                    default: return ()=>string.Empty;
                }
            }
        }
    }
}
